/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.suli.outHouse.service;

import com.alibaba.fastjson.JSONObject;
import me.zhengjie.entity.Result;
import me.zhengjie.suli.outHouse.domain.OrderDetail;
import me.zhengjie.suli.outHouse.domain.Orders;
import me.zhengjie.suli.outHouse.service.dto.OrdersDto;
import me.zhengjie.suli.outHouse.service.dto.OrdersQueryCriteria;
import me.zhengjie.suli.roll.domain.Roll;
import me.zhengjie.suli.rollDetail.domain.RollDetail;
import me.zhengjie.suli.tasks.domain.TaskDetail;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
* @website https://eladmin.vip
* @description 服务接口
* @author WYH
* @date 2024-02-01
**/
public interface OrdersService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(OrdersQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<OrdersDto>
    */
    List<OrdersDto> queryAll(OrdersQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return OrdersDto
     */
    OrdersDto findById(String id);

    /**
    * 创建
    * @param resources /
    * @return OrdersDto
    */
    OrdersDto create(Orders resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(Orders resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(String[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<String> all, HttpServletResponse response) throws IOException;


    /**
     * 接受sccs推送的
     * @param param
     * @return
     */
    String byCarDocument(String param);

    /**
     * 转仓随车单
     * @param param
     * @return
     */
    String rollByCar(String param);

    /**
     * 成本中心领用
     * @param param
     * @return
     */
    String costCenterUse(String param);


    /**
     * 接受SCCS推送的销售指令
     * @param param
     * @return
     */
    String receiveSalesInstructions(String param);

    /**
     * 新增出库任务
     * @param id
     * @return
     */
    Object addOutBoundTask(String id);
    
    String saveOrders(String param);

    String agvCallback(String param);

    Result returnLocation(String param);
    Map<String,Object> queryOrder(OrdersQueryCriteria criteria, Pageable pageable) throws ParseException;
    List<String> queryOrderByOut(OrdersQueryCriteria criteria);

    String rePushSccs(String param);
    List<TaskDetail> getCountByOrderId(String orderId);
    String outBoundByLocationCode(String param);

    String findCountByTask(String orderId);

    TaskDetail getBoxNumberByTrayCode(String param);

    public String outBoundNotRestricted(String param);
    public String quXiao(String param);
    public String selectOrderById(String param);
    public List<TaskDetail> selectOrderDetailById(String param);
    public String fenTaoOutBound(String param);
    public String fenTaoOther(String param);
    public String fenTaoOtherOne(String param);
    public String wanCheng(String param);
    public Result getTaskDetailCountByOrderId(String param);
    public String outBoundReturn(String param);
    public String outBoundByInventory(String param);
    public String outBoundVmiToFree(String param);

    public int receiveBillNumberFromPDA(String param);
    public int receiveHuiKuBoxNumberFromPDA(String param);
}